<style scoped>
    @import '../styles/detail.css';
</style>
<template>
    <div class="page-wrap page-detail" id="page-intro">
        <div class="g-body">
            <div class="m-intro">
                <header-component :page-name="pageName"></header-component>
                <div class="g-wrap m-intro-picWrap" v-html="content"></div>
            </div>
        </div>
    </div>

</template>
<script>
    import headerComponent from '../components/header'
    import Goods from '../module/goods'
    module.exports = {
        data() {
            return {
                id:'',
                pageName:'图文详情',
                content:''
            }
        },
        components: {

            headerComponent

        },
        created(){
            this.$dispatch('isLoading', true);
        },
        async ready() {

            if (!!this.$route.query.id){

                this.id = this.$route.query.id;

            } else {

                history.go(-1)

            }

            let res = await Goods.getIntro(this.id);
            console.log(res)
            this.content = res.content;



            this.$dispatch('isLoading', false);
        },
        beforeDestroy() {

        },
        methods: {}
    }
</script>
